import 'package:meiyunapp/generated/json/base/json_convert_content.dart';
import 'package:meiyunapp/net/base/error_entity.dart';

class BaseListEntity<T> {
  int state;
  String msg;
  List<T> data;
  ErrorEntity? errorEntity;

  BaseListEntity(
      {required this.state,
      this.msg = "",
      this.errorEntity,
      required this.data});

  factory BaseListEntity.fromJson(json) {
    return BaseListEntity(
      state: json["state"],
      msg: json["msg"],
      data: JsonConvert.fromJsonAsT<List<T>>(json["data"]),
    );
  }
}
